﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Store.Manager.ERP.Application.Dtos;
using Store.Manager.ERP.Application.Services;
using Store.Manager.ERP.Common.Models;

namespace StoreManager.ERP.Api.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class IncomingOrderController : ControllerBase
    {
        private IIncomingOrderService _service;
        public IncomingOrderController(IIncomingOrderService service) { _service = service; }

        [HttpPost]
        public Task<CommonResponse> Add(IncomingOrderDto dto) {
            return _service.Add(dto);
        }
    }
}
